import { createRouter, createWebHashHistory } from 'vue-router'
// import Login from '../views/Login.vue'
const router = createRouter({
  history: createWebHashHistory(),//路由模式
  routes: [
    { 
      path: '/',
      component: () => import('../view/Login.vue')
    },
    {
      path: '/home',
      component: () => import('../view/Home.vue'),
      children:[
          {
          path: 'menu1',
          component: () => import('../view/Menu1.vue'),
          },
          {
            path: 'menu2',
            component: () => import('../view/Menu2.vue'),
          },
          {
             path: 'menu3',
             component: () => import('../view/Menu3.vue'),
           },
          {
             path: 'menu4',
             component: () => import('../view/Menu4.vue'),
           }



      ],
    },
  ]
})

// 导航守卫

export default router